<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<style>
    *{padding:0px; margin:0px; font-size: 12px;font-family: arial,"Microsoft YaHei","\5fae\8f6f\96c5\9ed1";-webkit-font-smoothing: antialiased; line-height: 1.5;}
    #main{width:220px; text-align: center;  padding:5px; height: 160px; margin:180px auto; border: 1px solid #333333}
    .emli{margin-top: 10px;}
    input{height:20px; line-height: 20px;}
</style>
<body>
    <div id="main">

        <div class="emli"><span>请输入账号：</span><input id="username" ></div>

        <div class="emli"><span>请输入密码：</span><input id="password" type="password"></div>

        <div class="emli"><button id="login">确认登录</button></div>

    </div>
</body>

<script src="Common/Common.js"></script>
<script>
    CommonFileListRequertFile('Jquery');
    CommonFileListRequertFile('Layer');
    CommonFileListRequertFile('FunctionCommon');
    CommonFileListRequertFile('Socket');
    CommonFileListRequertFile('ProtocolApi');
    CommonFileListRequertFile('Login');

    window.onload=function (){
        var LoginController=new Login();

        $('#login').click(function () {
            var mes={
                username:$('#username').val(),
                password:$('#password').val()
            };
            ws.send(ProtocolApi.ProtocolMsg(ProtocolApi.Protocol['WEB_USER_LOGIN'],mes));

        });

        ws.onmessage=function (eve){
            LoginController.getAction(eve);
        };

    }

</script>
</html>